#ifndef CAFFEINE_COMPONENTS_MESSAGE
#define CAFFEINE_COMPONENTS_MESSAGE

#include "Math/Vector.hpp"

#include <iostream>
#include <string>

namespace Components
{
	class Message
	{
	public:
		Message( const std::string &setHeader, const int val )
			: header( setHeader ), intVal( val )
		{
			std::cout << "INT\n";
		}

		Message( const std::string &setHeader, const float val )
			: header( setHeader ), floatVal( val )
		{
			std::cout << "FLOAT\n";
		}

		Message( const std::string &setHeader, char *val )
			: header( setHeader ), strVal( val )
		{
			std::cout << "CHAR\n";
		}

		Message( const std::string &setHeader, const Math::Vectorf &val )
			: header( setHeader ), vecVal( val )
		{
			std::cout << "VECT\n";
		}

		~Message( void )
		{
		}

		std::string GetHeader( void ) const
		{
			return header;
		}

		int GetIntContent( void ) const
		{
			return intVal;
		}

		float GetFloatContent( void ) const
		{
			return floatVal;
		}

		std::string GetStringContent( void ) const
		{
			return strVal;
		}

		Math::Vectorf GetVectorContent( void ) const
		{
			return vecVal;
		}
	private:
		const std::string header;
		Math::Vectorf vecVal;
		
		union
		{
			int intVal;
			float floatVal;
			char *strVal;
		};
	};
}

#endif //CAFFEINE_COMPONENTS_MESSAGE